# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ntfs-log-tracker
pkgver=1.6
pkgrel=1
epoch=1
groups=('blackarch' 'blackarch-forensic' 'blackarch-windows')
pkgdesc='This tool can parse $LogFile, $UsnJrnl of NTFS.'
arch=('x86_64')
url='https://sites.google.com/site/forensicnote/ntfs-log-tracker'
license=('custom:unknown')
depends=('wine' 'wine_gecko' 'wine-mono')
source=("https://sites.google.com/site/forensicnote/ntfs-log-tracker/NTFS%20Log%20Tracker%20v$pkgver%20CMD.zip")
sha512sums=('8fff9ecb5b810b3997a800c5461a8879bbe497552443e0b5071ab5b07a623104873fd2241a27a13cf36f3a4da4fd98a56925365c6ac44210d944c1f747f08de6')

package() {
  cd "NTFS Log Tracker v1.6 CMD"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/windows/$pkgname"

  cp --no-preserve=ownership sqlite3.dll "NTFS_Log_Tracker_CMD_V$pkgver.exe" \
    "$pkgdir/usr/share/windows/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/windows/$pkgname
exec wine NTFS_Log_Tracker_CMD_V$pkgver.exe "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

